<!-- Calendar -->
			<link rel='stylesheet' type='text/css' href='media/js/fullcalendar-1.4.3/redmond/theme.css' />
			<link rel='stylesheet' type='text/css' href='media/js/fullcalendar-1.4.3/fullcalendar-my.css' />
			<script type='text/javascript' src='media/js/fullcalendar-1.4.3/fullcalendar.js'></script>
			<script type='text/javascript' src='media/js/ui.core.js'></script>
			<script type='text/javascript' src='media/js/ui.draggable.js'></script>
			<script type='text/javascript' src='media/js/ui.resizable.js'></script>
<!-- !Calendar -->
<script type="text/javascript">
	$(function(){	
		$.fullCalendar.parseDate( 'a' );		
		$('#calendar2').fullCalendar({
			date: <?php echo date('d',$date) ?>,
			month:<?php echo date('m',$date)-1 ?>,
			year:<?php echo date('Y',$date) ?>,
			defaultView: 'agendaDay',
			allDayDefault: false,
			header: {
						left: 'today',
						center: 'title',
						right: 'prev,next'
					},
			theme: true,
			editable: true,
			disableDragging : true,
			disableResizing : true,
			eventClick: function(event){
			window.location = '<?php echo base_url()?>calendars/view/' + event.id;
					},
					events: "<?php echo base_url()?>calendars/events/?agency_id=<?php echo $category->id ?>",
					loading: function(bool) {
					if (bool) $('#loading').show();
						else $('#loading').hide();
					}
				});
            });
        </script>

<div class="topic"><img src="themes/thaigcd/images/topic_calendar.png" /></div>




<div id="breadcrumb"><ul><li><a href="home/<?php echo $category->slug ?>"><?php echo $category->name ?></a></li><span>»</span><li><a href="calendars/index/<?php echo $category->slug ?>">ปฎิทินกิจกรรม</a></li></ul><div class="clear"></div></div>
<div class="box">
	<h1 class="orange">
		<img src="uploads/icon/head/plan.png" />
		<span>ปฎิทินกิจกรรม</span>
		<div class="corner_left"></div>
		<div class="corner_right"></div>
	</h1>
	<div class="view">
		<div style="height:30px; margin-top:-20px;">&nbsp;
			<div id='loading' style='display:none;text-align:center;'><img src="media/images/ajax-loader.gif" /></div>
		</div>
	<div id='calendar2'></div>
	<div style="clear:both;"></div>
	</div>
</div>
